package Employee;

public class Employee {

	private String ID;
	private String name;
	private double basicmoney;
	private double insurce;
	private double deduct;
	
	Employee(String ID,String name){
		
		this.ID = ID;
		this.name = name;	
	}
	
	void setbasicmoney(double basicmoney){
		
		this.basicmoney = basicmoney;
		
	}
	
    void setinsurce(double insurce){
		
    	this.insurce = insurce;
	}
    
    void setdeduct(double deduct){
		
    	this.deduct = deduct;
	}
    
    void selfvalu(){
    	double result = 0;
    	if(basicmoney>=0 && basicmoney<1500){
    		
    		result = (basicmoney-insurce-deduct)*0.03 - 0;
    		
    	}else if(basicmoney>=1500 && basicmoney<4500){
    		
    		result = (basicmoney-insurce-deduct)*0.1 - 105;
    		
    	}else if(basicmoney>=4500 && basicmoney<9000){
    		
    		result = (basicmoney-insurce-deduct)*0.2 - 555;
    		
    	}else if(basicmoney>=9000 && basicmoney<35000){
    		
    		result = (basicmoney-insurce-deduct)*0.25 - 1005;
    		
    	}else if(basicmoney>=35000 && basicmoney<55000){
    		
    		result = (basicmoney-insurce-deduct)*0.3 - 2755;
    		
    	}else if(basicmoney>=55000 && basicmoney<80000){
    		
    		result = (basicmoney-insurce-deduct)*0.35 - 5505;
    		
    	}else if(basicmoney>=80000){
    		
    		result = (basicmoney-insurce-deduct)*0.45 - 13505;
    		
    	}
    	
    	
    	System.out.println(result);
    }
    
}
